<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="w" uri="http://www.groupwareworkbench.org.br/widgets/commons" %>
<%@ taglib prefix="tag" uri="http://www.groupwareworkbench.org.br/widgets/tag" %>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta http-equiv="Cache-Control" content="no-cache">
        <title>Not&iacute;cias</title>
        <link rel="shortcut icon" type="image/x-icon" href="${pageContext.request.contextPath}/images/favicon.ico" />
        <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/common.css" />
        <script type="text/javascript" src="${pageContext.request.contextPath}/js/listagem.js"></script>
        <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.js"></script>
        <script type="text/javascript" src="${pageContext.request.contextPath}/ckeditor/ckeditor.js"></script> 
        <script type="text/javascript" src="${pageContext.request.contextPath}/ckeditor/sample-ckeditor.js"></script>
        <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/ckeditor/sample-ckeditor.css" />
        <tag:scriptTags />
    </head>
    <body>
        <w:topo collabletInstance="${newsMgr.collablet}" />
        <w:conteudoPagina titulo="News:">
            <br />
            <h1><span class="style1">Cadastro</span></h1>
            <br />
            <%-- TODO: Tableless! --%>
            <form name="dados" method="post" action="<c:url value="/groupware-workbench/news/${newsMgr.id}" /> ">
                <input type="hidden" name="news.id" value="<c:out value="${news.id}" />" />
                <table cellpadding="3">
                    <tr>
                        <td>T&iacute;tulo</td>
                        <td><input size="60" type="text" name="news.title" value="<c:out value="${news.escapedTitle}" />" /></td>
                    </tr>
                    <tr>
                        <td>Subt&iacute;tulo</td>
                        <td><input size="60" type="text" name="news.subTitle" value="<c:out value="${news.escapedSubTitle}" />" /></td>
                    </tr>
                    <tr>
                        <td>Conte&uacute;do</td>
                        <td><textarea class="ckeditor" rows="4" cols="60" name="news.body"><c:out value="${news.body}" /></textarea></td>
                        <%--td><he:htmleditor id="editor1" name="editor1" rows="4" cols="60" value="${news.body}" /></td--%>
                        <td></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <c:if test="${tagMgr != null}">
                                Tags clique em uma das tags abaixo para adicion&aacute;-la à notícia.
                                <br />
                                <tag:selectTags tagMgr="${tagMgr}" />
                                <tag:setTags tagMgr="${tagMgr}" entity="${news}" />
                            </c:if>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <c:if test="${recommendMgr != null}">
                                <recommend:simpleList entity="${news}" recommendMgr="${recommendMgr}" />
                            </c:if>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center" valign="middle">
                            <input type="submit" class="botao" value="Ok" />
                        </td>
                    </tr>
                </table>
                <br />
                <br />
                <br />
            </form>
            <div class="barra_botoes">
                <w:voltar collabletInstance="${newsMgr.collablet}" />
            </div>
        </w:conteudoPagina>        
    </body>
</html>